const path = require("path");
const { merge } = require("webpack-merge");
const common = require("./webpack.common");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
module.exports = merge(common, {
  mode: "production",
  output: {
    publicPath: "./",
  },
  plugins: [
    // new CopyWebpackPlugin({
    //   patterns: [
    //     {
    //       from: path.resolve(__dirname, "../public/cdn"),
    //       to: path.resolve(__dirname, "../dist"),
    //     },
    //   ],
    // }),
    new HtmlWebpackPlugin({
      template: path.resolve(__dirname, "../public/index.html"),
      cdn: ["./verovivo/verovio-toolkit.js"],
    }),
  ],
});
